/**
 * ship-device edit
 */
let _this;
let _loading;
let shipId = "";shipName="";
layui.use(['form', 'tableSelect', 'layedit', 'laydate'], function () {
    let form,layer,tableSelect,layedit,laydate,$;
    form = layui.form,
        layer = layui.layer,
        tableSelect = layui.tableSelect,
        layedit = layui.layedit,
        laydate = layui.laydate,
        $ = layui.$;

    let u = localStorage.getItem("ADMIN_LOGIN");
    let loginU = {};
    if (u == undefined) {
        layer.msg('请登录', {icon: 1, time: 500}, function () {
            window.location = 'page/login.html';
        });
    } else {
        loginU = decryptLocalStorage(u);
    }
    // if(loginU.shipId!=0){
    //     shipId=loginU.shipId
    // }
    let _data = localStorage.getItem("movieUserData");
    let viewData = undefined;

    if (_data != undefined) {
        viewData = decryptLocalStorage(_data, loginU.token);
        $("#shipId").val(viewData.shipId);
        $("#shipName").val(viewData.shipName);
        $("#trueName").val(viewData.trueName);
        $("#userName").val(viewData.userName);
        $("#password").val(viewData.password);
        $("#mobile").val(viewData.mobile);
        $("#idCard").val(viewData.idCard);
        $("#nickname").val(viewData.nickname);
        $("#sex").val(viewData.sex);
        $("#userStatus").val(viewData.userStatus);
        $("#remark").val(viewData.remark);
        form.render('select');
    }

});
